home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 August: Tool Chest / Dev.CD Aug 98 TC.toast / Tool Chest / Development Kits / • Other Platforms / PCCTS 1.31 / Documentation / UPDAT121.txt < prev    next >
Encoding:
Text File  |  1995-03-10  |  23.2 KB  |  727 lines  |  [TEXT/MPS ]

  1. PCCTS 1.21 --- Release Notes
  2.  
  3. Terence J. Parr
  4. University of Minnesota 
  5. Army High-Performance Computing 
  6. Research Center 
  7. Minneapolis, MN 55415 
  8. parrt@acm.org 
  9.  
  10. Russell W. Quong 
  11. School of Electrical Engineering 
  12. Purdue University
  13. W. Lafayette, IN 47907
  14. quong@ecn.purdue.edu 
  15.  
  16.  
  17. [This author list only includes active participates for 1.21]
  18.  
  19.  
  20. This document describes the 1.21 release of the Purdue Compiler
  21. Construction Tool Set (PCCTS).  Aside from a few bug fixes, this
  22. release merely cleans up the C++ output---the C++ interface has been
  23. changed slightly since 1.20 (March 31, 1994).  The original 1.00
  24. manual and all release notes are required for a complete documentation
  25. set for PCCTS.  A book is in the works and the papers provided at the
  26. ftp site don't hurt.
  27.  
  28. PCCTS is in the public-domain and can be obtained at 
  29. marvin.ecn.purdue.edu in pub/pccts/1.21.  The newsgroup 
  30. comp.compilers.tools.pccts provides a discussion forum.
  31. Alternatively, you can join the pccts-users mailing list dealing
  32. with tools ANTLR, DLG (and SORCERER) by emailing 
  33. pccts-users-request@ahpcrc.umn.edu with a body of subscribe
  34. pccts-users your-name-or-ret-addr.  To receive future release
  35. broadcast messages, register yourself by sending email to 
  36. pccts@ecn.purdue.edu with a ``Subject:'' line of ``
  37. register''.
  38.  
  39. The authors make no claims that this software will do what you want,
  40. that this manual is any good, or that the software actually
  41. works---use PCCTS at your own risk.  Bug reports and/or cheery reports
  42. of its usefulness are very welcome, however.
  43.  
  44. From the 1.21 release forward, the maintenance and support of all
  45. PCCTS tools will be primarily provided by Parr Research Corporation,
  46. Minneapolis MN---an organization founded on the principles of
  47. excellence in research and integrity in business; we are devoted to
  48. providing really cool software tools.  Please see file 
  49. PCCTS.FUTURE for more information.  All PCCTS tools currently in the
  50. public domain will continue to be in the public domain.
  51.  
  52.  
  53. [This file was automatically converted from the LaTeX source; please
  54.  see the Postscript version of this file where possible].
  55.  
  56.  
  57. Introduction
  58.  
  59. The PCCTS 1.21 release is mainly an upgrade for the C++ output.  The
  60. test examples have now been successfully compiled under a number of
  61. C++ compilers.  Further, C++ mode may now use arbitrary lookahead with
  62. a ``sliding window'' of lookahead rather than reading in the entire
  63. input file before commencement of parsing.  Any grammars written with
  64. 1.20 C++ output should be easy to convert to 1.21.  The C++ interface
  65. section provides the new parser definition and invocation sequence.
  66. The C++ output is still considered alpha quality, but within a release
  67. or two, it should be up to ``parr''.
  68.  
  69. A number of bug fixes have been done and a very nice configuration file
  70. has been produced to aid in porting PCCTS.
  71.  
  72. Scott Haney at Lawrence Livermore National Labs has done a fabulous
  73. port of PCCTS 1.21 to the Macintosh (primarily MPW).
  74.  
  75. Configuration File
  76.  
  77. A new file, config.h, is provided to make porting ANTLR, DLG,
  78. and SORCERER easier.  This file defines file names, standard symbols
  79. such as USEPROTOS and CPPFILESUFFIX, directory
  80. characters, and various things for standard ports such as MPW.
  81.  
  82. The file support/set.h need no longer be modified for 16 bit
  83. compilers.
  84.  
  85. Define preprocessor symbol PC to enable a bunch of PC stuff like
  86. .obj for object files and ``'' for the directory symbol.
  87.  
  88. Define preprocessor symbol MPW to enable a bunch of Mac stuff.
  89.  
  90. C++ Interface
  91.  
  92. [Warning: The C++ output is still in a state of change as we learn
  93. more about what it should look like.  This should stabilize soon].
  94.  
  95. When generating recursive-descent parsers in C++, ANTLR creates
  96. separate C++ classes for the input stream, the lexical analyzer
  97. (scanner), the token buffer, and the parser.  Conceptually, these
  98. these classes fit together as shown in Figure , and in
  99. fact, the ANTLR-generated classes ``snap together'' in an identical
  100. fashion.  To initialize the parser, the programmer simply
  101.  
  102.  
  103.  
  104. attaches an input stream object to a DLG-based scannerIf the
  105. user has constructed their own scanner, they would attach it here., 
  106.  
  107.  
  108. attaches a scanner to a token buffer object, and
  109.  
  110.  
  111. attaches the token buffer to a parser object generated by ANTLR.
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121. The following code illustrates, for a parser object Expr, how
  122. these classes fit together.
  123.  
  124.  
  125. main()
  126.  
  127.     DLGFileInput in(stdin);           // get an input stream for DLG
  128.     DLGLexer scan(in,2000);          // connect a scanner to an input stream
  129.     ANTLRTokenBuffer pipe(scan, k);  // connect scanner and parser via ``pipe''
  130.     ANTLRToken aToken;
  131.     scan.setToken(aToken);           // give DLG access to a virtual table
  132.     Expr parser(pipe);               // make a parser connected to the pipe
  133.     parser.init();                    // initialize the parser
  134.     parser.e();                       // begin parsing; e = start symbol
  135.  
  136.  
  137.  
  138.  
  139. where ANTLRToken is programmer-defined and must be a subclass of
  140. ANTLRAbstractToken (or one of the predefined classes below it).
  141. To start parsing, it is sufficient to call the Expr member
  142. function associated with the grammar rule; here, e is the start
  143. symbol.
  144.  
  145. To specify the name of the parser class in an ANTLR grammar
  146. description, enclose the appropriate rules and actions in a C++
  147. class definition, as follows.
  148.  
  149.  
  150. class Expr 
  151. <<int i;>>
  152. <<
  153. public:
  154.     void print();
  155. >>
  156. e   :   INT ("*" INT)* ;
  157.                      // other grammar rules
  158.  
  159.  
  160.  
  161.  
  162. Thus, a parser object is simply a set of actions and routines for
  163. matching a rule.  Consequently, it is natural to have many separate
  164. parser objects.  For example, if parsing C code, we might have
  165. different parser classes for C expressions, for C function
  166. definitions, and for assembly code.  Parsing multiple languages or
  167. parts of languages simply involves switching parsers objects.  For
  168. example, assume you have a working C language front-end.  To evaluate
  169. C expressions in a debugger, just use the parser object for C
  170. expressions (assuming the semantic actions were flexible enough).
  171.  
  172. Currently, ANTLR only allows one class definition per grammar.  This
  173. will change in future versions when we figure out how grammar class
  174. inheritance should work.
  175.  
  176. To ensure compatibility among different input streams, lexers, token
  177. buffers, and parsers, all objects are derived from one of the four
  178. common bases classes DLGInputStream, DLGLexer (or 
  179. ANTLRTokenStream if you roll your own lexer), ANTLRTokenBuffer
  180. or ANTLRParser.
  181.  
  182. Please see the C++ sample files collected in the testcpp.tar
  183. file.
  184.  
  185. C++ Token Definitions
  186.  
  187. To increase flexibility, the token class hierarchy has changed since
  188. release 1.20; see Figure .  We did this mainly so that
  189. the minimal token is simply an int.  Some programmers have
  190. existing scanners which cannot be modified.  We encountered one such
  191. scanner that defined tokens to be integers; hence, a mandatory virtual
  192. table pointer inside each token object would render ANTLR and their
  193. system incompatible.
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. The classes are described as follows:
  202.  
  203.  
  204.  
  205. An ANTLRAbstractToken cannot be instantiated and can be
  206. subclassed for truly unusual token definitions; this requires changes
  207. to the functions in ANTLRParser which obtain the token type from
  208. a token object such as ANTLRParser::LT().
  209.  
  210.  
  211. If a programmer wants a token object that merely holds a token type
  212. and does not contain a virtual table, they may subclass 
  213. ANTLRLightweightToken.  However, because ANTLR wants to know the text
  214. and line number associated with a token for error reporting purposes,
  215. ANTLRParser must be subclassed to redefine the error handling
  216. routines such as ANTLRParser::syn().
  217.  
  218.  
  219. Class ANTLRTokenBase describes the behavior of token objects as
  220. desired by ANTLR.  Specifically, ANTLR token objects know their token
  221. type, line number, and associated input text.  This is mainly for
  222. error reporting purposes.
  223.  
  224.  
  225. Any ANTLR grammar that uses DLG to produce a scanner must derive a token
  226. class from DLGBasedToken.  This class adds a int line
  227. field to the token object.
  228.  
  229.  
  230. Class ANTLRCommonToken is derived from DLGBasedToken and
  231. contains a text field.
  232.  
  233.  
  234. Class ANTLRCommonBacktrackingToken is the same as 
  235. ANTLRCommonToken except that it should be used when syntactic
  236. predicates are used in the ANTLR grammar OR when lookahead
  237. .  See the C++ test files and Section .
  238.  
  239.  
  240.  
  241. The programmer must still define type ANTLRToken to be one of the
  242. predefined classes or to one of their own just as in 1.20.
  243.  
  244. If you defined your own ANTLRToken::makeToken() for the 1.20
  245. release, it's return type must be changed to
  246.  
  247.  
  248. virtual ANTLRLightweightToken *makeToken(TokenType, ANTLRChar *, int);
  249.  
  250.  
  251. The Mysterious makeToken() Function
  252.  
  253. Some readers may wonder why function makeToken() is required at
  254. all and why the programmer has to pass the address of an 
  255. ANTLRToken into DLG during parser initialization.  Why cannot the
  256. constructor be used to create a token and so on?  The reason lies with
  257. the scanner, which must construct the token objects.  The DLG support
  258. routines are typically in a precompiled object file that is linked in
  259. regardless of your token definition.  Hence, DLG must be able to
  260. create tokens of any type.  
  261.  
  262. Because objects in C++ are not ``self-conscious'' (i.e., they don't
  263. know their own type), DLG has no idea what the appropriate constructor
  264. is.  Constructors cannot be virtual anyway; so, we had to come up with
  265. a ``constructor'' that is virtual and that acts like a factory---it
  266. returns the address of a (possibly new) token object upon each
  267. invocation rather than just initializing an existing object.
  268.  
  269. Because classes are not first-class objects in C++ (i.e., you cannot
  270. pass class names around), we must pass DLG the address of an 
  271. ANTLRToken token object so DLG has access to the appropriate virtual
  272. table and is, thus, able to call the appropriate makeToken().
  273.  
  274. This weirdness would disappear if all objects knew their type or if
  275. class names were first-class objects.
  276.  
  277. Here is the code fragment in DLG that constructs the token objects
  278. that are passed to the parser via the ANTLRTokenBuffer:
  279.  
  280.  
  281. ANTLRAbstractToken *DLGLexerBase::
  282. getToken()
  283.  
  284.     if ( tokenvtbl==NULL ) DLGPanic("NULL tokenvtbl");
  285.     TokenType tt = nextTokenType();
  286.     DLGBasedToken *tk;
  287.     tk = (DLGBasedToken *)tokenvtbl->makeToken(tt, lextext, line);
  288.     tk->setLine(line);
  289.     return tk;
  290.  
  291.  
  292.  
  293. ANTLR Token Buffers and Streams
  294.  
  295.  
  296. The 1.20 release of PCCTS connected an ANTLRTokenStream to the
  297. parser to provide tokens.  In an effort to isolate the arbitrary
  298. lookahead mechanism from the parser class, 1.21 introduces 
  299. ANTLRTokenBuffers.  The parser is ``attached'' to an 
  300. ANTLRTokenBuffer via interface functions getToken() and 
  301. bufferedToken().  The object that actually consumes characters and
  302. constructs tokens, a derivatived of ANTLRTokenStream, is
  303. connected to the ANTLRTokenBuffer via interface function 
  304. getToken() where ANTLRTokenStream is really just a behavior
  305. (class with no data).  [C++ does not have this abstraction and hence
  306. we simply have come up with a fancy name for ``void *''].
  307.  
  308. Define DEBUGTOKENBUFFER to have ANTLR do extra checking to
  309. ensure your arguments to the ANTLRTokenBuffer constructor make
  310. sense.  You must specify enough minimum arbitrary lookahead to cover
  311. the finite lookahead specified on the ANTLR command line.
  312.  
  313. The ANTLRTokenBuffer class maintains a ``sliding window'' of
  314. lookahead into the ANTLRTokenStream; a minimum window size must
  315. be specified during token buffer construction.  This set of pointers
  316. can point to a single or multiple token objects.  The following
  317. scenarios are possible:
  318.  
  319.  
  320.  
  321. The parser does not need to backtrack (no syntactic predicates).
  322.  
  323.  
  324. If DLG is used to produce an ANTLRTokenStream, then 
  325. makeToken() can simply fill in a static, local copy of an 
  326. ANTLRToken and return the same address continuously.  Here is how
  327. an ANTLRCommonToken ``computes'' a token for DLG.
  328.  
  329.  
  330. virtual ANTLRLightweightToken *makeToken(TokenType tt, ANTLRChar *txt, int line)
  331.         
  332.             static ANTLRCommonToken t;
  333.             t.setType(tt); t.setText(txt); t.setLine(line);
  334.             return t;
  335.         
  336.  
  337.  
  338.  
  339. If you make your own scanner, you can return the same object just like
  340. DLG does.  For example, a scanner that simply returned tokens with
  341. increasing integer token types could be defined as follows:
  342.  
  343.  
  344. ANTLRAbstractToken *MyLexer::getToken()
  345.  
  346.     static MyToken t;
  347.     static int i=1;
  348.     t.setType(i++);
  349.     return t;
  350.  
  351.  
  352.  
  353. where MyLexer is the name of your scanner class.
  354.  
  355.  
  356.  
  357. In both cases, the scanner has the option to return the same physical
  358. object (modified each time the scanner is called) or return a stream
  359. of physical different token objects.
  360.  
  361. ANTLR by default makes a copy of all objects sent to the parser and so
  362. the -variables point to distinct, local copies of the token
  363. objects passed to the token buffer.  This is unnecessary if you pass
  364. distinct objects to the token buffer in the first place; the ANTLR
  365. -ct command line option can be used to turn this redundant
  366. copying off.  [Warning: It is very possible that in a future
  367. version, the token buffer will do the copying rather than the parser].
  368.  
  369.  
  370. The parser must be able to backtrack.  In this case, physically
  371. distinct tokens must be passed to the ANTLRTokenBuffer by 
  372. ANTLRTokenStream::getToken().  During backtracking, the parser
  373. reloads its local token type cache from the ANTLRTokenBuffer's
  374. sliding window of token pointers.  If the token pointers all pointed
  375. to the same token, the lookahead cache in the parser could not be
  376. reloaded correctly.
  377.  
  378.  
  379.  
  380. If DLG is used to produce an ANTLRTokenStream, DLG cannot simply
  381. modify and return the same token object.  Currently, the new
  382. operator is used by the predefined token objects such as 
  383. ANTLRCommonBacktrackingToken.  The programmer is free to subclass and
  384. redefine makeToken() to use a more efficient memory allocator.
  385. Here is the definition of the ANTLRCommonBacktrackingToken.
  386.  
  387.  
  388. class ANTLRCommonBacktrackingToken : public ANTLRCommonToken 
  389. public:
  390.     virtual ANTLRLightweightToken *makeToken(TokenType tt, ANTLRChar *txt, int line)
  391.         
  392.             ANTLRCommonToken *t = new ANTLRCommonToken;
  393.             t->setType(tt); t->setText(txt); t->setLine(line);
  394.             return t;
  395.         
  396.     ANTLRCommonBacktrackingToken(TokenType t, ANTLRChar *s) : ANTLRCommonToken(t,s)
  397.         ;
  398.     ANTLRCommonBacktrackingToken() ;
  399. ;
  400.  
  401.  
  402.  
  403. If the programmer defines his/her own scanner, then they must return
  404. distinct token objects as well.  For example, we could modify our 
  405. getToken() above in the following way:
  406.  
  407.  
  408. virtual ANTLRAbstractToken *MyLexer::getToken()
  409.         
  410.             static MyToken *t = new MyToken;
  411.             static int i=1;
  412.             t->setType(i++);
  413.             return t;
  414.         
  415.  
  416.  
  417.  
  418.  
  419. For backtracking parsers, the -ct command line option should be
  420. used to turn off redundant copying token object copying because the
  421. ANTLRTokenBuffer will already contain distinct objects.
  422.  
  423. It is the programmers responsibility to track and to delete
  424. any ANTLRToken objects that they create.
  425.  
  426.  
  427.  
  428. Access to the Lookahead Buffer
  429.  
  430. ANTLR parsers may access the  token object of lookahead via
  431. the ANTLRParser::LT() function.  LT(1) always returns a
  432. pointer to the token object for the next lookahead symbol.  You may
  433. look ahead until end-of-file if necessary.  Define 
  434. DEBUGTOKENBUFFER to have ANTLR do extra checking to ensure your
  435. arguments to the ANTLRTokenBuffer constructor make sense and
  436. that your calls to LT() are ok.  You may check  for validity
  437. by calling inputTokens->bufferSize() where inputTokens is
  438. an member variable of your ANTLRParser; References to 
  439. LT() beyond the end of file returns a pointer to the 
  440. ANTLRToken for end of file as you have prescribed.
  441.  
  442. Semantic predicates in C++ mode should use the following rather than
  443. LATEXT().  For example,
  444.  
  445.  
  446. typename : <<isType(LT(1)->getText())>>? ID ;
  447.  
  448.  
  449. The LA() function access the local parser token type cache
  450. and, hence, is only valid for .
  451.  
  452. Arbitrary Lookahead and Semantic Predicates
  453.  
  454. There are language constructs that truly need a combined syntactic and
  455. semantic predicate to be parsed correctly.  One possible solution is
  456. to use a semantic predicate that calls a function that ``spins'' ahead
  457. looking at the infinite token buffer and checks for semantic validity
  458. as well.  For example,
  459.  
  460.  
  461. int isQualClassName()
  462.  
  463.     int i=1;
  464.     ANTLRToken *tk = LT(1);
  465.  
  466.     if ( LA(1)!=ID  tk==NULL ) return 0;
  467.  
  468.     while ( tk->getType()!=Eof 
  469.             (tk->getType()==ID  tk->getType()==COLONCOLON) )
  470.     
  471.         tk = LT(++i);
  472.     
  473.     if ( isClassName( LT(i-1)->getText() ) ) return 1;
  474.     return 0;
  475.  
  476.  
  477. qualifiedclassname
  478.     :   <<isQualClassName()>>? ( ID "::" )* ID
  479.     ;
  480.  
  481.  
  482.  
  483. where isClassName() is some function that examines the symbol
  484. table to determine whether or not the argument is a valid class name.
  485. This is not completely robust, but demonstrates the idea.
  486.  
  487. A mechanism like this is required to distinguish between qualified
  488. class names and qualified identifiers in C++.
  489.  
  490. Global Variables
  491.  
  492. If the programmer requires a variable which is visible to all rules,
  493. they may define a global variable inside the class definition.
  494. Doing so renders the variable a member of the class and, hence, a real
  495. global variable in the C/C++ sense is not defined---resulting in a
  496. cleaner (and re-entrant) program.  For example,
  497.  
  498.  
  499. class MyClass 
  500. <<char *currentfilename;>>
  501.  
  502. a : ... <<currentfilename = "blah";>> ;
  503.  
  504.  
  505.  
  506.  
  507. -Variables in C++ Mode
  508.  
  509. Because attributes do not exist in C++ mode, -variables point to
  510. ANTLRTokens.  Further, -variables do not exist for rule
  511. references.  Rule arguments and return values should be used instead.
  512. We anticipate the removal of -variables all together in future
  513. releases in favor of labels for rule elements such as in the
  514. tree-parser generator SORCERER.
  515.  
  516. -variables are pointers to ANTLRTokens exclusively in C++ mode.
  517.  
  518. DLG Classes
  519.  
  520. The DLG C++ interface has not changed from a programmer's point of
  521. view.
  522.  
  523. Miscellaneous Changes
  524.  
  525.  
  526.  
  527. The genmk program has been upgraded in a few minor ways.  For
  528. example, it is now sensitive to the config.h file; hence, it
  529. will now do the ``right thing'' for the PC (such as using .obj
  530. instead of .o).
  531.  
  532.  
  533. The ANTLR -gk option is now a warning not an error
  534. when used with semantic predicates.
  535.  
  536.  
  537. In C++ mode, the programmer can change the line member, but
  538. should call the newline() member function instead.  Access to
  539. the current line number can be obtained via line().  The parser
  540. normally does not access the line number directly from the lexer in
  541. C++ mode, however.  Typically, the ANTLRToken object contains
  542. the line number on which it was found.
  543.  
  544.  
  545. In C++ mode, DLG now assumes DLGInputStream::nextChar() returns
  546. an int so that -1 (EOF) is handled correctly.
  547.  
  548.  
  549.  
  550. New or Renamed Supplied Files
  551.  
  552.  
  553.  
  554. AParser.h:  All ANTLR parser support
  555. classes and the ANTLRParser class itself.
  556.  
  557.  
  558. AParser.C:  ANTLR parser support code.
  559.  
  560.  
  561. DLexerBase.h:  DLG scanner support classes and DLGLexerBase
  562. class.
  563.  
  564.  
  565. DLexerBase.C:  DLG scanner support code.
  566.  
  567.  
  568. ASTBase.h:  AST class definition.
  569.  
  570.  
  571. ASTBase.C:  AST support code.
  572.  
  573.  
  574. DLexer.C:  Support code that must be aware of the
  575. particular scanner generated by DLG.  This is an ugly mechanism
  576. for including the DFA automaton and will change in future versions.
  577.  
  578.  
  579. AToken.h:  Definitions for classes ANTLRTokenBase,
  580. ANTLRLightweightToken, ANTLRAbstractToken, 
  581. DLGBasedToken, and ANTLRCommonToken.
  582.  
  583.  
  584. ATokenStream.h:  Definition of class ANTLRTokenStream.
  585.  
  586.  
  587. ATokenBuffer.h:  Definition of class ANTLRTokenBuffer.
  588.  
  589.  
  590. ATokenBuffer.C:  Code for class ANTLRTokenBuffer.
  591.  
  592.  
  593.  
  594. Bugs Fixed for 1.21
  595.  
  596.  
  597.  
  598. Fixed a hideous bug in the -gl generate line info option that
  599. sometimes put the line directive not at the left edge of a line.
  600.  
  601.  
  602. Fixed a bug in match with -gk mode; it didn't work before.
  603.  
  604.  
  605. Added setmatch() to C++ output mode.
  606.  
  607.  
  608. The genmk program had a number of small bugs.
  609.  
  610.  
  611. In the old antlrx.h file for C++ output, zzfailedpred
  612. was missing a semi-colon.
  613.  
  614.  
  615. The line number stuff for infinite lookahead was screwed up even
  616. for C mode.  This has changed so that the zzline variable (in C
  617. mode) consistently for any mode.  For C++ output, the newline()
  618. and line() macros may be used.  To access the line number for a
  619. particular token from the parser, use the getLine() 
  620. ANTLRToken function.
  621.  
  622.  
  623. The return type for erraction in the DLG C++ output should
  624. have been TokenType to be consistent with the other lexical
  625. actions.
  626.  
  627.  
  628. The enum TokenType definition no longer has a trailing comma.
  629.  
  630.  
  631. DLG sometimes defined DfaState inconsistently for C++ output.
  632.  
  633.  
  634. The AST stuff didn't work correctly with syntactic predicates because
  635. of a missing zzNONGUESSMODE in the zzEXIT macro (C mode).
  636.  
  637.  
  638. Previously, the -w2 generated a warning for basically every
  639. token definition indicating that it has no associated regular
  640. expression.
  641.  
  642.  
  643. The DLGFileInput class now always immediately returns EOF
  644. once that condition has been detected once.  It is no longer necessary
  645. to type more than one end of file character in C++ mode.
  646.  
  647.  
  648.  
  649. Future
  650.  
  651.  
  652.  
  653.  
  654. Good error recovery and reporting is notoriously difficult to achieve
  655. with parser generators, especially -based tools.  The previously
  656. mentioned parser exception handling was discussed at the first
  657. annual PCCTS workshop.  A reasonable implementation/syntax has been
  658. obtained and we anticipate their introduction by the end of 1994.
  659.  
  660.  
  661. The recognition strength of hand-built parsers arises from the fact
  662. that arbitrarily-complex expressions can be used to distinguish
  663. between alternative productions.  We will introduce a new type of
  664. predicate called a prediction predicate that constitutes the
  665. entire prediction expression for a particular production; i.e., ANTLR
  666. does not generate code to test lookahead for the associated
  667. production.  We anticipate the notation: ``<<
  668. this-is-the-entire-prediction-expression>>?!''.
  669.  
  670.  
  671. A graphical user interface is planned using a multi-platform window
  672. library.  This ``GUI'' will display syntax diagrams on the screen and,
  673. hence, ambiguities in the grammar can be highlighted.  The output of
  674. the GUI will be an ANTLR grammar or a PostScript representation of the
  675. syntax diagram.  The GUI would be an actual product sold by Parr Research
  676. Corporation, but would be tremendously cool.
  677.  
  678.  
  679.  
  680. [The users of PCCTS should be forewarned that we anticipate
  681. a break with total backward compatibility for a future release
  682. (perhaps PCCTS 2.00).  This release is intended to fix the odious C
  683. output generated by the current version of ANTLR/DLG and a number of
  684. other little things.
  685.  
  686. We anticipate an intermediate break that will change the grammar
  687. meta-language.  Any book on PCCTS to be written will describe this
  688. version of reality.  Also remember that the C++ output is going to
  689. change as we learn more about it.]
  690.  
  691. Acknowledgements
  692.  
  693. As usual, there are a large number of people to thank for their help
  694. with PCCTS (more than we can hope to acknowledge here).
  695.  
  696. Thanks are due to Sumana Srinivasan, Mike Monegan, and Steve Naroff of
  697. NeXT, Inc. for their continuing help in the definition of the ANTLR
  698. C++ output.  Further, Sumana's work on the C++ grammar (no, we don't
  699. have a release date set yet) is fabulous.
  700.  
  701. We thank Gary Funck at Intrepid Technology for his work on SORCERER,
  702. which we hope to release soon with PCCTS as standard baggage.  He
  703. always has good suggestions for ANTLR as well.
  704.  
  705. Steve Robenalt at Rockwell single-handedly pushed the 
  706. comp.compilers.tools.pccts news group through.  Further, he continues
  707. to maintain the FAQ.
  708.  
  709. We thank Scott Haney at Lawrence Livermore National Labs for his
  710. Macintosh port of PCCTS.
  711.  
  712. We thank Tom Moog (moog@polhode.com) for his continued efforts
  713. on the NOTES.newbie information file.
  714.  
  715. We would also like to thank the multitude of other users of PCCTS for
  716. their excellent suggestions and beta-testing of the C++ output.
  717.  
  718. The planning group for the first annual PCCTS workshop included:
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.